<div class="row">
    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
        <div class="widget am-cf">
            <form id="my-form" class="am-form tpl-form-line-form" method="post">
                <div class="widget-body">
                    <fieldset>
                        <div class="widget-head am-cf">
                            <div class="widget-title am-fl">新增合伙人</div>
                        </div>
                        <div class="am-form-group" >
                            <div class="am-u-sm-9 am-u-end">
                                <input type="hidden" name="agent[type]" value="2">
                            </div>
                        </div>

                        <div class="am-form-group" >
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">合伙人名称</label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="text" class="tpl-form-input" name="agent[real_name]" value=""
                                       required>
                            </div>
                        </div>

                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">合伙人性质 </label>
                            <div class="am-u-sm-9 am-u-end">
                                <label class="am-radio-inline">
                                    <input type="radio" name="agent[level]" value="2" data-am-ucheck checked>
                                    企业
                                </label>
                                <label class="am-radio-inline">
                                    <input type="radio" name="agent[level]" value="1" data-am-ucheck
                                    >
                                    个人
                                </label>
                            </div>
                        </div>
                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">联系电话</label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="text" class="tpl-form-input" name="agent[company_tel]" value=""
                                       required>
                            </div>
                        </div>
                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">参与分红百分比</label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="text" class="tpl-form-input" name="agent[service_charge]" value="30" readonly="true"
                                       required>
                            </div>
                        </div>
                        <div class="am-form-group otherAnswer1" >
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">可添加免费代言人数量</label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="text" class="tpl-form-input" name="agent[employees_num]" value="3"
                                       required readonly>
                            </div>
                        </div>
                       <!-- <div class="am-form-group">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">合伙人推荐获得的奖金</label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="text" class="tpl-form-input" name="agent[reward]" value=""
                                       required>
                            </div>
                        </div>-->
                        <div class="am-form-group am-padding-top-sm">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">合伙人账户名 </label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="text" class="tpl-form-input" name="agent[user_name]" value=""
                                       required>
                                <small>合伙人后台用户名</small>
                            </div>
                        </div>
                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">合伙人账户密码 </label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="password" class="tpl-form-input" name="agent[password]" value=""
                                       required>
                                <small>合伙人后台用户密码</small>
                            </div>
                        </div>
                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 确认密码 </label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="password" class="tpl-form-input" name="agent[password_confirm]" value=""
                                       required>
                            </div>
                        </div>
                        <div class="am-form-group">
                            <div class="am-u-sm-9 am-u-sm-push-3 am-margin-top-lg">
                                <button type="submit" class="j-submit am-btn am-btn-secondary">提交
                                </button>
                            </div>
                        </div>
                    </fieldset>
                </div>
            </form>
        </div>
    </div>
</div>
<script>
    $(function (){
        $('#my-form').superForm();
    });
    $("input[type='radio']").change(function(){
        if($(this).val()=="2"){
            $(".otherAnswer1").show();
        }
        else{
            $(".otherAnswer1").hide();
        }
    });
</script>
